window.onload = function () {
    document.onmousedown = function (event) {    //鼠标点击
        const loginContainer = document.getElementById("login-container");
        loginContainer.style.visibility = "visible";
        // 点击后添加动画类，触发动画
        loginContainer.classList.add("animate");
        document.getElementById("touch_to_start").style.visibility = "hidden";
    }
}

function reg() {
    console.log("注册");
    if (document.getElementById("reg-container").style.visibility === "hidden") {
        document.getElementById("reg-container").style.visibility = "visible";
        document.getElementById("login-container").style.visibility = "hidden";
    }
    else {
        document.getElementById("reg-container").style.visibility = "hidden";
        document.getElementById("login-container").style.visibility = "visible";
    }
}

function log() {
    console.log("登录");
    location.href = "index.html";
}
